
<div class="row">
  <div class="col-xs-12 col-md-12">
    <div class="widget">
      <div class="widget-header ">
        <span class="widget-caption">角色列表</span>
        <div class="widget-buttons">
          <a href="#" data-toggle="maximize">
            <i class="fa fa-expand"></i>
          </a>
          <a href="#" data-toggle="collapse">
            <i class="fa fa-minus"></i>
          </a>
          <a href="#" data-toggle="dispose">
            <i class="fa fa-times"></i>
          </a>
        </div>
      </div>
      <div class="widget-body">
        <div class="table-toolbar">
          <a  href="role/new" class="btn btn-default">创建角色</a>
        </div>
        <div role="grid" id="editabledatatable_wrapper" class="dataTables_wrapper form-inline no-footer">
          <table class="table table-striped table-hover table-bordered dataTable no-footer" id="editabledatatable" aria-describedby="editabledatatable_info">
            <thead>
            <tr role="row">
              <th rowspan="1" colspan="1" style="min-width: 80px;">角色名</th>
              <th rowspan="1" colspan="1" style="min-width: 80px;">说明</th>
              <th rowspan="1" colspan="1" style="min-width: 98px;">功能</th>
              <th rowspan="1" colspan="1" style="min-width: 70px;"></th>
            </tr>
            </thead>
            <tbody>
            <% roles.forEach(function(role){ %>
            <tr>
              <td>
              <%= role.Name %>
              </td>
              <td>
              <%= role.Desc||'' %>
              </td>
              <td>
                  <% if(role.Name==='admin'){%> <span class="gray">[全部]</span> <%}else{%>
                  <%= role.Funcs||'' %>
                  <%}%>
              </td>
              <td>
              <a class="btn btn-info btn-xs edit" href="/role/edit/<%=role.id%>" >修改</a>
              <a class="btn btn-danger btn-xs delete" href="" <% if(role.Name==='admin'){ %>disabled="disabled"<%}%> onclick="funDel('<%=role.id%>');">删除</a>
              </td>
            </tr>
            <% }) %>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
</div>
